<!DOCTYPE html>

<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>火灾物证鉴定系统</title>
    <link rel="stylesheet" th:href="@{/css/login2.css}">
</head>
<body style="background-color: #4d5685">
    <div class="login" style="background-color: #4d5685">
        <div class="login_title">
            <p><img src="/img/jinghui.png" style="width:80px;height:80px;margin-right:30px;"/>火灾物证鉴定系统</p>
        </div>
        <div class="login_main" style="margin-left:-72px;">
            <div class="main_left" ><img src="/img/u3.webp" style="margin-left: 150px;margin-bottom: 20px;padding-bottom: 20px;height: 360px;width: 560px;" alt=""></div>
            <div class="main_right" style="height: 360px">
                <div class="right_title" style="color: #ee6545; font-size: 22px">用户注册</div>
                <form th:action="@{/user/register}" method="post" id="registerForm">
                    <div class="username" >
                            <img src="/img/username.png" alt="">
                            <input type="text" name="username" placeholder="请输入用户名" >
                    </div>

                    <div class="password">
                        <img src="/img/password.png" alt="">
                        <input type="password" name="firstPassword" placeholder="请输入密码" >
                    </div>

                    <div class="password2">
                        <img src="/img/password.png" alt="">
                        <input type="password" name="secondPassword" placeholder="确认密码" >
                    </div>

                    <div class="yes_login">
                        <a onclick="document:registerForm.submit()" style="background-color: #e26141">注&nbsp;&nbsp;&nbsp;&nbsp;册 </a>
                        &nbsp;<a onclick="window.location.href='login.html'" style="background-color: #e26141">返回登录 </a>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        var nametest;
        var pswtest;
        var pswtest1;

        function jugname(){
            var name=document.getElementById("user").value;
            if(name.length<16&&name.length>0){
                nametest=true;
                document.getElementById("namemsg").innerHTML="<span style='color: green;'>√</span>";
            }
            else{
                document.getElementById("namemsg").innerHTML="<span style='color: red;'>×</span>";
                nametest=false;
            }
        }

        function jugpsd(){
            var jugname=document.getElementById("psd").value;
            if(jugname.length<17&&jugname.length>0){
                document.getElementById("pwdmsg").innerHTML="<span style='color: green;'>√</span>";
                pswtest=true;
            }
            else{
                document.getElementById("pwdmsg").innerHTML="<span style='color: red;'>×</span>";
                pswtset=false;
            }
        }
        function  jugpsd1() {
            var jugname2=document.getElementById("psd1").value;
            if(jugname2.length<17&&jugname2.length>0&&document.getElementById("psd").value==jugname2){
                document.getElementById("pwd1msg").innerHTML="<span style='color: green;'>√</span>";
                pswtest1=true;
            }
            else{
                pswtest1=false;
                document.getElementById("pwd1msg").innerHTML="<span style='color: #ff0000;'>×</span>";
            }
        }
        </script>
    <!--弹窗-->
    <script th:inline="javascript">
        a=[[${msg}]]
        if(a!=null)
        {alert(a);}
    </script>
</body>
</html>